from http.server import HTTPServer
from http.server import BaseHTTPRequestHandler
class MyHandler(BaseHTTPRequestHandler):
	def do_GET(self):
		print(self.requestline);
		print(self.headers);
		self.wfile.write('<p>hello</p>'.encode('utf-8'));  #没有状态码，谷歌浏览器不显示
		return ;

if __name__=='__main__':
	server=HTTPServer(('localhost',8080),MyHandler);
	server.serve_forever();